package grad.nxu.recruitsystem.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import grad.nxu.recruitsystem.domain.Seeker;
import grad.nxu.recruitsystem.dto.User;
import grad.nxu.recruitsystem.mapper.SeekerMapper;
import grad.nxu.recruitsystem.service.SeekerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author HAPPY
 * @description 针对表【seeker】的数据库操作Service实现
 * @createDate 2023-03-09 22:59:06
 */
@Service
public class SeekerServiceImpl extends ServiceImpl<SeekerMapper, Seeker>
        implements SeekerService {
    @Autowired
    SeekerMapper seekerMapper;

    @Override
    public User login(User seeker) {
        return seekerMapper.login(seeker);
    }

    @Override
    public int modifyPassword(String email, String password) {
        if (seekerMapper.modifyPassword(email, password)) {
            return 1;
        } else {
            return 0;
        }
    }
}




